﻿using Microsoft.Phone.Controls;
using System.Windows;
using TheVerge.Base.Models;

namespace TheVerge.Phone.Pages
{
    public partial class LoginPage : PhoneApplicationPage
    {
        private readonly VMLogin VM;
        public LoginPage()
        {
            InitializeComponent();
            DataContext = VM = new VMLogin();
        }

        private void Login_Click(object sender, RoutedEventArgs e)
        {
            VM.Login(tbUserName.Text, tbPassword.Password);
        }

        private void Logout_Click(object sender, RoutedEventArgs e)
        {
            VM.Logout();
        }
    }
}